Skip to content

Enable Option-drag selection in ttyd#39

Merged
jfox85 merged 1 commit into
mainfrom
jf-ttyd-option-selection
Apr 28, 2026
Merged

Enable Option-drag selection in ttyd#39
jfox85 merged 1 commit into
mainfrom
jf-ttyd-option-selection

Conversation

@jfox85

@jfox85 jfox85 commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • pass xterm.js macOptionClickForcesSelection through ttyd client options
  • cover ttyd client options in tests

Verification

  • go vet ./...
  • go test -v -race ./...
  • cd web/app && npm run build

Note: golangci-lint is not installed locally.

Summary by CodeRabbit

  • New Features
    • Enabled macOS users to configure Option-click behavior for text selection in the terminal.

@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a21ea8a9-7f9d-40ec-8136-024795552d98

📥 Commits

Reviewing files that changed from the base of the PR and between 7d1e4e9 and 7603442.

📒 Files selected for processing (2)
  • web/ttyd.go
  • web/ttyd_test.go

📝 Walkthrough

Walkthrough

This pull request adds a macOS-specific configuration flag to the ttyd terminal emulator, setting macOptionClickForcesSelection=true to modify Option-click selection behavior. The corresponding test is updated to verify this new flag is included in the command-line arguments.

Changes

Cohort / File(s) Summary
ttyd Configuration
web/ttyd.go
Added -t macOptionClickForcesSelection=true command-line argument to configure macOS Option-click selection behavior in ttyd.
ttyd Tests
web/ttyd_test.go
Updated test to verify the new macOptionClickForcesSelection=true flag is present among ttyd command-line arguments by iterating over expected -t options.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A click on Mac, so swift and true,
Option held tight, selection through,
In ttyd's arms, the choice now stays,
macOS magic brightens our days! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Enable Option-drag selection in ttyd' accurately describes the main change: adding macOptionClickForcesSelection=true to enable Option-key selection behavior in ttyd.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jf-ttyd-option-selection

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jfox85 jfox85 merged commit 2fbdca5 into main Apr 28, 2026
23 checks passed
@jfox85 jfox85 deleted the jf-ttyd-option-selection branch April 28, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant